package com.llynic.designdemo.decoratormode;

public class DecoratorA extends Decorator {
    public DecoratorA(Component component) {
        super(component);
    }

    @Override
    public void say() {
        System.out.println("装饰者A在say方法前做的动作");
        this.component.say();
        System.out.println("装饰者A在say方法前做的动作");
    }

    @Override
    public void buy() {
        System.out.println("装饰者A在buy方法前做的动作");
        this.component.buy();
        System.out.println("装饰者A在buy方法前做的动作");
    }
}
